body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: #f0f0f0;
    font-family: Arial, sans-serif;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

#gameCanvas {
    border: 2px solid #333;
    border-radius: 5px;
    background-color: #fff;
    background-image: linear-gradient(#ddd 1px, transparent 1px),
                      linear-gradient(90deg, #ddd 1px, transparent 1px);
    background-size: 20px 20px;
}

.controls {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.score-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 400px;
}

#score, #highScore {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.speed-control {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 400px;
}

#speed {
    flex: 1;
    height: 5px;
    -webkit-appearance: none;
    background: #ddd;
    border-radius: 5px;
    outline: none;
}

#speed::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    background: #4CAF50;
    border-radius: 50%;
    cursor: pointer;
}

.buttons {
    display: flex;
    gap: 10px;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #45a049;
}

.game-instructions {
    width: 100%;
    max-width: 400px;
    padding: 15px;
    background-color: #f8f8f8;
    border-radius: 5px;
}

.game-instructions h2 {
    margin-top: 0;
    color: #333;
    font-size: 18px;
}

.game-instructions ul {
    margin: 0;
    padding-left: 20px;
    color: #666;
}

.game-instructions li {
    margin: 5px 0;
    font-size: 14px;
}